load("//bazel:mongo_src_rules.bzl", "mongo_cc_library", "mongo_cc_unit_test")

package(default_visibility = ["//visibility:public"])

exports_files(
    glob([
        "*.h",
        "*.cpp",
    ]),
)

mongo_cc_library(
    name = "doc_validation",
    srcs = [
        "doc_validation_error.cpp",
        "doc_validation_util.cpp",
    ],
    deps = [
        "//src/mongo:base",
        "//src/mongo/db:query_expressions",
    ],
)

mongo_cc_unit_test(
    name = "doc_validation_test",
    srcs = [
        "doc_validation_error_json_schema_test.cpp",
        "doc_validation_error_test.cpp",
    ],
    tags = ["mongo_unittest_fourth_group"],
    deps = [
        ":doc_validation",
        "//src/mongo/db/pipeline:expression_context_for_test",
        "//src/mongo/db/query/compiler/parsers/matcher:matcher_parser",
    ],
)
